<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:insert="~{head::headDiv('geyuhao')}"></div>

hello : <div th:text="${username}"></div>
hello : <div th:utext="${username1}">xxx</div>
用户名：<input type="text" th:value="${username}">
<br>
性别：<input type="radio" th:checked="${sex==1}">男
<input type="radio" th:checked="${sex==2}">女
所在城市：
<select>
    <option th:selected="${city=='guangzhou'}">广州</option>
    <option th:selected="${city=='yueyang'}">岳阳</option>
    <option th:selected="${city=='changsha'}">长沙</option>
</select>
<h2>学习遍历</h2>
<table border="1">
    <tr>
        <th>id</th>
        <th>名字</th>
        <th>密码</th>
    </tr>
    <tr th:each="user:${users}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.username}"></td>
        <td th:text="${user.pass}"></td>
    </tr>
</table>
当前时间：<span th:text="${#dates.format(date,'yyyy-MM-dd HH:mm:ss')}"></span>
<br>
<h2> 前端发请求测试</h2>
<a th:href="@{/login(username='gyh',pass='123456')}">测试@{}</a>
<br>
<h2>th:action学习</h2>
<form th:action="@{/login}" method="get">
账号：<input type="text" name="username">
密码：<input type="text" name="pass">
    <input type="submit" value="登录">
</form>
<br>
<hr>
<table>
    <tr>
        <td>id</td>
        <td>姓名</td>
        <td>性别</td>
        <td>年龄</td>
        <td>班级</td>
    </tr>
    <tr th:each="s:${stus}">
        <td th:text="${s.id}"></td>
        <td th:text="${s.name}"></td>
        <td>
            <input type="radio" th:checked="${s.gender}=='男'" />男
            <input type="radio" th:checked="${s.gender}=='女'" />女
        </td>
        <td th:text="${s.age}"></td>
        <td>
            <select >
                <option th:selected="${s.classname}=='计科1班'">计科1班</option>
                <option th:selected="${s.classname}=='计科2班'">计科2班</option>
                <option th:selected="${s.classname}=='计科3班'">计科3班</option>
            </select>
        </td>

    </tr>
</table>
</body>
</html>